Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mint bird from LIFF #21

Merged
merged 5 commits into from
Jul 29, 2024
Merged

Mint bird from LIFF #21

merged 5 commits into from
Jul 29, 2024

Conversation

shiki-tak
Copy link

I implemented the following to make it possible to mint Birds as NFTs from the Flutter Bird App.

flutter_bird_image_server

  • Implement flutter_bird_image_server
    • A bird image is generated based on the received tokenID.
    • The same data url will always be returned for the same tokenId.
    • Currently, the hosting is on Vercel, and there are restrictions on using the file system. Therefore, the generated image is not saved on the server, but the data URL is included in the response and returned.
    • The image size of bird is around 10KB at most, so it does not put a large load on the system.
  • flutter_bird_image_server/create_birds/create_data.js and the generate_image and generate_metadata files it calls use the files that were already in the original repository. Only the parts related to fs have been deleted.
  • mint_full_onchain_bird/mint_random_skin.js is a script for manually minting bird and will not be called when minting from the flutter app.

flutter_bird_app

flutter_bird_skins

  • Implement appendUri
    • The image data url is set to the tokenURI of the NFT.
    • This allows you to retrieve the image data by simply querying the contract's tokenURI.
    • The image is not stored anywhere on the file server and exists entirely on-chain.
    • Therefore, we no longer use IPFS.
  • lib contracts
    • The contracts in flutter_bird_skins/lib use already implemented contracts around storage.

LIFF URL

@shiki-tak shiki-tak self-assigned this Jul 19, 2024
Copy link

github-actions bot commented Jul 19, 2024

@github-actions github-actions bot temporarily deployed to Netlify Preview July 19, 2024 06:08 Inactive
@shiki-tak shiki-tak requested review from da1suk8 and Mdaiki0730 July 19, 2024 06:15
Dockerfile Outdated Show resolved Hide resolved
flutter_bird_image_server/server.js Show resolved Hide resolved
@Mdaiki0730
Copy link
Member

I can't connect to metamask, why does it take me to the app store with the app downloaded if it is a universal link?

RPReplay_Final1721871875.mp4

@shiki-tak
Copy link
Author

I can't connect to metamask, why does it take me to the app store with the app downloaded if it is a universal link?

RPReplay_Final1721871875.mp4

I don't have iOS so I can't test it thoroughly. I look into it.

da1suk8
da1suk8 previously approved these changes Jul 25, 2024
Copy link
Member

@da1suk8 da1suk8 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@170210
Copy link

170210 commented Jul 25, 2024

I want ask a question.
When I tried https://liff.line.me/2005806035-kp4pmzW2 with metamask, it requires me signature two times. But it doesn't appear in current LIFF application.

@shiki-tak
Copy link
Author

I want ask a question. When I tried https://liff.line.me/2005806035-kp4pmzW2 with metamask, it requires me signature two times. But it doesn't appear in current LIFF application.

When do you mean "two signatures"? When I tried it, it appeared once each on connect and mint. In the case of mint, if you manually navigate to metamask, the signature popup will appear.

@shiki-tak
Copy link
Author

@Mdaiki0730 PTAL comments.

And the problem of opening the app store without starting metamask may be due to a problem with the device or metamask settings. Therefore, as a result of the meeting, we decided to deal with it separately from this PR.

@github-actions github-actions bot temporarily deployed to Netlify Preview July 29, 2024 03:49 Inactive
@shiki-tak shiki-tak merged commit ab91313 into master Jul 29, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants